* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
  width: 100%;
  background-color: hsl(235, 36%, 46%); /* opcionalno pozadina */
  padding: 1rem 2rem;
  font-family: "Red Hat Display";
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* tarvitaan mobiilissa */
  box-sizing: border-box;
}

.nav {
  display: flex;
  gap: 3rem; /* etäisyys  Projects, About, Contact  välillä*/
  justify-content: flex-end;
}

.nav a {
  /*margin: 0;*/
  cursor: pointer;
  font-size: 1rem;
  color: white;
  position: relative; /*eventualno moje i bez tova*/
  text-decoration: none;
}

.nav a::after {
  /*aleviivattu*/
  content: "";
  width: 0;
  height: 2px;
  background-color: hsl(195, 100%, 75%);
  transition: width 0.5s ease;
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
}

.nav a:hover::after {
  width: 100%;
}

.logo img {
  width: 40px; /* можеш да променяш размера */
  height: auto;
}

/*-------------------------Background image-------------------------------*/
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  align-items: center;
  height: 45vh;
  color: #fff;
}
.hero img {
  position: absolute; /*tekee niin että kuva ei peiteisi header*/
  top: 0;
  left: 0;
  width: 100%; /* 100% viewport leveys*/
  height: 100%;
  object-fit: cover; /* Täyttää valinnaisesti koko leveyden vääristymättä*/
  z-index: -1;
}
/* #backgrImage-text {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -40%);
  text-align: center;
  color: white;
} */

#backgrImage-text {
  position: static;
  top: 40%;
  left: 50%;
  transform: none;
  text-align: center;
  color: white;
}

@keyframes fadeIn {
  /*sulavat siirtymät*/
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#backgrImage-text h1,
#backgrImage-text p {
  animation: fadeIn 1s ease forwards;
}

/*-----------------------------------------------------------------------------*/
body {
  background-color: hsl(195, 100%, 75%);
  font-family: "Red Hat Display", sans-serif;
}

.container {
  padding: 40px;
  color: hsl(235, 36%, 46%);
}
.container h2 {
  color: hsl(235, 36%, 46%);
}
.about {
  text-align: center;
  padding: 50px 20px;
}

.about h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.about-content {
  display: flex;
  justify-content: center; /* Слагаме снимката и текста в редица */
  align-items: center;
  flex-wrap: wrap; /* За да се пренарежда на мобилни устройства */
  gap: 120px; /* Разстояние между снимката и текста */
}

.about-text {
  max-width: 600px; /* Ограничаваме ширината на текста */
}

.about-text p {
  margin-bottom: 20px; /* Разстояние между параграфите */
  line-height: 1.6;
}

/*-----Kuvaagaleria grid -----*/
.gallery {
  background-color: white;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 200px; /* височината се базира на ширината */
  gap: 1rem;
  width: 100%;
  height: 100%;
  margin-top: 20px;
}

.gallery_item {
  overflow: hidden;
}

.gallery_item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Размери за различни типове изображения */
.img_vertical {
  grid-row: span 2;
}

.img_vertical--big {
  grid-row: span 2;
  grid-column: span 2;
}

.img_horisontal--big {
  grid-column: span 3;
  grid-row: span 2;
}

/*--------------------------------CONTACT FORM-------------------------------------------------------*/

.form-wrap {
  min-height: 40vh;
  background: hsl(235, 36%, 46%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

h2 {
  color: white;
}

form {
  flex-grow: 1; /* Заема останалото място */
  max-width: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

label {
  color: #f8f8fb;
  margin-top: 20px;
  margin-bottom: 5px;
  font-size: 16px;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border-radius: 5px;
  border: none;
  margin-bottom: 10px;
  font-size: 16px;
}

textarea {
  resize: vertical; /* Позволява само вертикално разтягане */
  min-height: 150px;
}

button {
  margin-top: 20px;
  background: #50dfff;
  color: hsl(235, 36%, 46%);
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background: #38c0da;
}

.attribution {
  margin-top: 30px;
  color: white;
  font-size: 0.9em;
}

.attribution a {
  color: aqua;
  text-decoration: none;
}

#toTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 90px;
  height: 45px;
  background-color: #50dfff;
  color: hsl(235, 36%, 46%);
  border: none;
  border-radius: 5px; /* Малко заобляне на ъглите */
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.3s, transform 0.3s;
  /* display: none;  <-- Махаме този ред! */
}

#toTopBtn:hover {
  background-color: #38c0da;
  transform: scale(1.1);
}

.social.content {
  display: flex;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto; /* Центрира целия блок по хоризонталата */
  align-items: flex-start;
  gap: 60px;
  margin-top: 40px;
}

.social-icons-left {
  width: 200px; /* Принуждава иконките да стоят вляво */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 60px;
  font-size: 2rem;
  margin-top: 40px;
}

.social-icons-left a {
  color: white;
  transition: color 0.3s ease;
}

.social-icons-left a:hover {
  color: #50dfff;
}

@media (max-width: 468px) {
  .social.content {
    flex-direction: column;
    align-items: center;
  }

  .social-icons-left {
    flex-direction: row;
    justify-content: center;
    width: auto;
    gap: 60px;
    font-size: 2rem;
    margin-top: 40px;
  }

  form {
    width: 90%;
  }
  @media (max-width: 600px) {
    .hero {
      height: auto;
      min-height: 70vh;
      padding: 40px 20px;
    }
  }
}
