/* -----------------------------
   Reset i ogólne style
----------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff;
  color: #444;
  line-height: 1.6;
  padding-top: 60px; /* miejsce na navbar */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Dzięki temu main wypełni przestrzeń */
main {
  flex: 1 0 auto;
}

/* -----------------------------
   Navbar (desktop)
----------------------------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #c3e6cb; /* pastelowa zieleń */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 30px;
  z-index: 1000;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
}

nav ul li a {
  text-decoration: none;
  color: black;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 10px 15px;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
  letter-spacing: 0.03em;
}

nav ul li a:hover,
nav ul li a:focus {
  background-color: #db9fc9;
  color: #fff;
  outline: none;
}

/* -----------------------------
   Burger menu (mobile)
----------------------------- */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
  margin-left: auto;
}

.burger div {
  height: 3px;
  background-color: black;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animacja wjazdu od lewej dla głównych bloków */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Główne bloki — start bez animacji, animacja po dodaniu klasy .active */
.animate-slide-in {
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-slide-in.active {
  opacity: 1;
  transform: translateX(0);
  animation: slideInFromLeft 0.7s ease forwards;
}

@keyframes slideInFromBottom {
  0% {
    opacity: 0;
    transform: translateY(30px); /* nie 100% */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-in-bottom {
  opacity: 0;
  transform: translateY(30px); /* pasuje do animacji */
  transition: opacity 0.85s ease, transform 0.5s ease;
}

.animate-slide-in-bottom.active {
  opacity: 1;
  transform: translateY(0);
  animation: slideInFromBottom 1.9s ease forwards;
}

/* -----------------------------
   Mobile styles
----------------------------- */
@media (max-width: 1024px) {
  .burger {
    display: flex;
  }

  nav ul.main-nav {
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    background: white;
    padding: 2rem;
    gap: 1.5rem;
    justify-content: flex-start;
    align-items: flex-end;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  nav ul.main-nav.open {
    right: 0;
  }

  nav ul.main-nav li {
    text-align: right;
    width: 100%;
  }

  nav ul.main-nav li a {
    font-size: 1.1rem;
    padding: 10px 0;
    display: inline-block;
    width: 100%;
  }

  .burger.open div:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .burger.open div:nth-child(2) {
    opacity: 0;
  }

  .burger.open div:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* -----------------------------
   Stopka
----------------------------- */
footer {
  background: #c3e6cb;
  font-weight: 500;
  text-align: center;
  padding: 18px 30px;
  margin-bottom: 0;
  flex-shrink: 0;
}

/* -----------------------------
   Linki globalnie
----------------------------- */
a {
  color: #db9fc9;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: #a3557b;
  outline: none;
}

/* -----------------------------
   Kontener ogólny
----------------------------- */
.container {
  max-width: 1100px;
  margin: 40px auto 80px;
  padding: 0 25px;
}

/* -----------------------------
   Scroll to top button
----------------------------- */
#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #f8e9f0;
  border: none;
  color: #6a5aa3;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(195, 230, 203, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
  pointer-events: none;
}

#scrollToTop.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

#scrollToTop:hover,
#scrollToTop:focus {
  background-color: #f8e9f0;
  outline: none;
}

/* -----------------------------
   Responsywność: czcionki i padding
----------------------------- */
@media (max-width: 900px) {
  main {
    background-attachment: scroll !important; /* zamiast fixed */
  }

  footer {
    flex-direction: column;
    padding: 10px 15px;
    font-size: 0.8rem;
    max-height: none;
    height: auto;
  }

  .footer-left,
  .footer-right {
    margin: 5px 0;
    text-align: center;
    white-space: normal;
  }
  
  nav ul {
    gap: 20px;
  }
}

@media (max-width: 480px) {
  nav ul {
    gap: 12px;
  }

  nav ul li a {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
}

