* {
  box-sizing: border-box;
}

body {
  background-color: #ebcace;
  background-image: url("background.png");
  background-repeat: repeat;
  font-family: "Gabriela", serif;
  color: #ad6875;
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (min-width: 768px) {
  body {
    font-size: 1.125rem;
  }
}

main {
  max-width: 95%;
  background-color: rgba(230, 197, 203, 0.8);
  margin: 1.5rem auto;
  padding: 1rem; /* mniej na małych ekranach */
  border-radius: 0.9rem;
}

@media (min-width: 768px) {
  main {
    padding: 3rem;
    max-width: 80%;
  }
}

h2 {
  text-align: center;
  color: #965360;
  background: rgba(212, 163, 181, 0.9);
  line-height: 1.5;
  padding: 0.4rem 0.8rem;
  border-radius: 0.7rem;
  -webkit-box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
  -moz-box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
  box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
  display: inline-block;
  margin: 0;
}

ul {
   list-style-image: url('/gifs/cherry.gif');
}

ul li {
  line-height: 1.8;
}


.header-logo {
  text-align: center;
  margin: 1.5rem auto;
  padding: 0.5rem;
  background: rgba(201, 143, 165, 0.8);
  display: block; /* to działa z margin auto */
  width: fit-content;
  border-radius: 0.9rem;
  -webkit-box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
  -moz-box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
  box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
  max-width: 100%;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap; /* zawsze obok siebie */
}

.header-top img {
  height: auto;
  flex-shrink: 1;
}


.header-logo img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration-skip-ink: auto;
  color: #965360;
}


.navigation {
  text-align: center;
  max-width: 95%;
  background-color: rgba(230, 197, 203, 0.8);
  margin: 0 auto;
  border-radius: 0.9rem;
  padding: 1.5%;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 768px) {
  .navigation {
    flex-direction: row;
    justify-content: space-between;
    gap: 30px;
    max-width: 80%;
  }
}

.navigation ul {
  background: rgba(212, 163, 181, 0.9);
  list-style: none;
  padding: 0.75rem;
  margin: 0;
  display: flex;
  flex-wrap: wrap; /* pozwala zawijać na małych ekranach */
  justify-content: center;
  gap: 0;
  border-radius: 0.7rem;
  -webkit-box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
  -moz-box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
  box-shadow: 10px 8px 26px 0px rgba(150, 83, 96, 1);
}

.navigation h2 {
  margin: 0;
}

.navigation li:not(:last-child)::after{
  content:" ❀ ";
  margin: 0 10px;
  color: rgba(150, 83, 96, 1);
}

@media (min-width: 768px) {
  .navigation li:not(:last-child)::after {
    margin: 0 20px; /*więcej marginesu na dużych ekranach */
  }
}

.navigation a {
  text-decoration: none;
  color: #965360;
  transition: text-shadow 0.3s ease;
}

.navigation a:hover {
  text-shadow:0 0 10px rgba(150, 83, 96, 1),
              0 0 20px rgba(150, 83, 96, 0.6);
}

.nav-toggle {
  display: none;
  background: rgba(212, 163, 181, 0.9);
  border: none;
  color: #965360;
  padding: 0.75rem 1.5rem;
  border-radius: 0.7rem;
  cursor: pointer;
  font-size: 1rem;
  font-family: "Gabriela", serif;
  box-shadow: 5px 4px 13px 0px rgba(150, 83, 96, 0.6);
  transition: box-shadow 0.3s ease;
}

.nav-toggle:hover {
  box-shadow: 0 0 15px rgba(150, 83, 96, 0.6);
}

/* nawigacja na małych ekranach */ 
@media (max-width: 767px){
  .nav-toggle{
    display:block;
  }
  
  .navigation h2 {
    display: none;
  }
  
  .navigation .nav-links {
    display: none;
  }
  
  .navigation .nav-links.active {
    display: flex;
    flex-direction: column;
    width: 90%;
    gap: 0.5rem;
  }
  
  .navigation li {
    width: 100%;
    text-align: center;
    font-weight: bold;
  }
  
  .navigation li:not(:last-child)::after {
    display: none; /* Usuń kwiatki */
  }
  
  .navigation li::before {
    content: "❀ "; /* Kwiatek przed */
    color: rgba(150, 83, 96, 1);
    margin-right: 0.5rem;
  }
  
  .navigation button {
    font-weight: bold;
  }
}

p {
  text-align: justify;
  margin-block: 20px;
}

footer {
  text-align: end;
}

.guestbook-container {
  margin-top: 2rem;
  width: 100%;
  overflow: hidden; /*ukrywa to co wystaje z tego transform niżej */
}

.guestbook-container iframe {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 0.5rem;
  transform: translateY(-130px);
}

.gifs img {
  max-width: 100%;
  height:auto;
  margin: 0.3rem;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 2rem;
  max-width: 900px;
  margin: 2rem auto;
}

.gallery-section {
  margin-bottom: 3rem;
}

.section-header {
  background: rgba(212, 163, 181, 0.9);
  color: #965360;
  padding: 1rem 1.5rem;
  border-radius: 0.7rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  box-shadow: 5px 4px 13px 0px rgba(150, 83, 96, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header:hover {
  background: rgba(212, 163, 181, 1);
  background-image: url('bg_pink5.gif');
  box-shadow: 0 0 15px rgba(150, 83, 96, 0.8);
  transform: translateY(-2px);
}

.toggle-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.toggle-icon.rotated {
  transform: rotate(180deg);
}

.gallery .gallery-item {
  display: flex;
  flex-direction: column;
  position: relative;
  margin-bottom: 2rem;
}

.gallery .gallery-item:not(:last-child)::after {
  content: "";
  display: block;
  width: 100%;
  height: 20px;
  margin: 1.5rem 0 0 0;
  background: url('divider.gif') repeat-x center;
  background-size: auto 100%;
}

.gallery .gallery-item img {
  width: 100%;
  height: auto; /* teraz wysokość dopasowuje się do zdjęcia, nie sztywne 200px */
  max-width: 35%;
  object-fit: cover;
  border-radius: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  cursor: pointer;
  display: block;
}

@media (max-width: 767px) {
  .gallery .gallery-item img {
    max-width: 70%;
  }
}


.gallery .gallery-item img:hover {
  transform: scale(1.05);
  filter: sepia(40%) hue-rotate(320deg) saturate(150%) brightness(1.1);
  box-shadow: 0 0 20px rgba(150, 83, 96, 0.9),
              0 0 40px rgba(150, 83, 96, 0.5);
}

/* podpis pod każdym zdjęciem */
.gallery .caption-text {
  margin-top: 0.5rem;
  color: #965360;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: justify;
  max-width: 90%;
}

@media (min-width: 768px) {
  .gallery .caption-text {
    font-size: 1.1rem;     /* większa czcionka na większych ekranach */
    max-width: 60%; 
}
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 0.8rem;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  font-family: Arial, sans-serif;
  user-select: none;
}

.lightbox .caption {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(150, 83, 96, 0.8); /* Twój róż */
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  max-width: 90%;
  text-align: center;
}

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

