section {
  display: flex;
  justify-content: center;
  align-content: center;
  text-align: center;
  margin-bottom: 5%;
}

section h1 {
  color: #ffffff;
  margin: 5px;
}

.portfolio-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.portfolio-section.show {
  opacity: 1;
  transform: translateY(0);
}

html {
  scroll-behavior: smooth;
}

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 10%;
  scroll-margin-top: 100px; 
}

section h1 {
  color: #ffffff;
  margin: 5px;
}

.portfolio-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.portfolio-section.show {
  opacity: 1;
  transform: translateY(0);
}

.project-list {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 0%;
  margin-top: 25px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 1000px;
  margin: 3rem auto;
  margin: 20px;
}

.grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border-radius: 8px;
  padding: 2px;
  font-size: 16px;
  color: white;
  text-align: center;
}

.grid-item a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  transition: transform 0.2s ease-in-out;
}

.grid-item img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.144);
}

.grid-item:hover {
  transform: scale(1.02);
}

@media (max-width: 600px) {
  .grid-container {
    grid-template-columns: 1fr;
    margin: 20px;
  }
}

.contact-section {
  text-align: center;
  padding: 4rem 2rem;
  border-radius: 10px;
  max-width: 1700px;
  margin: 2rem auto;
  margin-top: -10%;
}

.contact-section h1 {
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.contact-section p {
  margin-bottom: 2rem;
  color: #ccc;
}

#contact-mel {
  background-color: #1416174f;
  border-radius: 14px;
  width: 100%;
  padding: 2rem 3rem;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
  max-width: 100%;

}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 23rem;
  padding: 12px 25px;
  border: 2px solid #2a2d2f;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: #ffffff;
  color: #0f1c14;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #63FF4E;
  box-shadow: 0 0 8px rgba(99, 255, 78, 0.3);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

#contact-mel button {
  background-color: #63ff4e;
  color: #0f1c14;
  font-weight: bold;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  border: none;
  width: 100%;
  cursor: pointer;
  transition-duration: 300ms;
  justify-content: center;
  display: inline;
  align-items: center;
  align-content: center;
}

#contact-mel button:hover {
  background-color: #72ff5f;
}

@media (max-width: 600px) {

  .contact-section {
    scale: 85%;
  }

  .contact-section {
    padding: 3rem 1rem;
  }

  .contact-form {
    gap: 1rem;
    scale: 120%;
  }

  #contact-mel {
    background-color: #1416174f;
    border-radius: 14px;
    width: 100%;
    padding: 5rem 3rem;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
}

.carousel-container {
  position: relative;
  width: 90%;
  margin: 2rem auto 0;
  overflow: hidden;
  user-select: none;
}

.carousel {
  display: flex;
  gap: 20px;
  overflow-x: scroll;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding: 20px 0;
}

.carousel:active {
  cursor: grabbing;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.opinia {
  flex: 0 0 calc((100% - 40px) / 3);
  background-color: #14161798;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.6s ease, transform 0.6s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  scale: 97%;
  
}

.opinia:hover {
  background-color: #20222498;
  transform: translateY(-2px);
}

.opinia.dummy {
  pointer-events: none;
  visibility: hidden;
  background: transparent;
}

@media(max-width: 1024px) {
  .opinia {
    flex: 0 0 calc((100% - 20px) / 2);
  }
}

@media(max-width: 768px) {
  .opinia {
    flex: 0 0 100%;
  }
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 10px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.opinia h3 {
  margin: 5px 0 2px;
  font-size: 1.1rem;
  text-align: center;
}

.rola {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
}

.stars {
  color: gold;
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 900;
}

.komentarz {
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
  margin: 0;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  user-select: none;
  z-index: 10;
}

.arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.arrow.left {
  left: 10px;
}

.arrow.right {
  right: 10px;
}

.scroller-box {
  width: 100%;
  max-width: 810px;
  margin: 40px auto;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  scrollbar-width: none;
}

.scroller-box::-webkit-scrollbar {
  display: none;
}

.scroller-track {
  display: flex;
  flex-wrap: nowrap;
  margin: 0 auto;
}

.scroller-item {
  flex: 0 0 250px;
  margin: 10px;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 20px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.scroller-item img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 10px;
  border: 2px solid #fff;
}

.scroller-item:hover {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

@media (max-width: 600px) {
  .scroller-box {
    max-width: 100vw;
    overflow: hidden;
  }

  .scroller-track {
    scroll-snap-type: x mandatory;
  }

  .scroller-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    margin: 10px 0;
  }

  .scroller-item img {
    width: 80px;
    height: 80px;
  }
}

