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

header {
  width: 100%;
  background-color: hsl(235, 36%, 46%);
  padding: 1rem 2rem;
  margin-right: 30px;
  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: rgb(135, 219, 250);
  transition: width 0.5s ease;
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
}

.nav a:hover::after {
  /*sulavat siirtymät*/
  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: rgb(135, 219, 250);*/
  font-family: "Red Hat Display", sans-serif;
  background-color: hsl(195, 100%, 75%);
}

.container {
  padding: 40px;
  color: hsl(235, 36%, 46%);
}

.container h2 {
  color: hsl(235, 36%, 46%);
}

/*projectin valokuva*/
.image-container {
  position: relative;
  display: inline-block;
}

.image-container img {
  display: block;
  width: 300px;
  height: 200px;
  border-radius: 8px;
}

/* GitHub in linkki kuvan keskellä */
.overlay-link {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background: hsl(235, 36%, 46%);
  padding: 10px 20px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  border-radius: 6px;
  opacity: 1; /* <-- ВИНАГИ ВИДИМ */
  /*opacity: 0;
  transition: opacity 0.3s ease;*/
}

/* Показва линка при hover zaedno s opacity: 0 i  transition 0.3s ease
.image-container:hover .overlay-link {
  opacity: 1;
}*/

/*-----------------------*/

/*----------------*/
.job-container {
  display: flex; /* jätjästää kaikki vieräkkäin horizontaalilla linjalla */
  justify-content: center; /* keskelle*/
  gap: 30px; /* tila projectien välillä */
  flex-wrap: wrap; /* jos näyttö on pieni,että kuvat putoavat toselle riville */
  padding: 20px;
}

.job {
  background: hsl(235, 36%, 46%);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  width: 300px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.job h3 {
  margin: 15px 0 10px;
  color: white;
}
.job a {
  display: inline-block;
  margin-bottom: 15px;
  color: #50dfff;
  text-decoration: none;
  font-weight: bold;
}

.job:hover {
  transform: translateY(-5px); /* nosto efekti */
}
/*----------About content-----------*/

.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; /* Подравнява по вертикала */
  /* gap: 40px;  Разстояние между снимката и текста */
  flex-wrap: wrap; /* За да се пренарежда на мобилни устройства */
  flex-direction: column;
}
/*
.about-content img {
    width: 300px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);   
}
*/
.about-content p {
  max-width: 750px;
  text-align: left;
  font-size: 18px;
  line-height: 1.6;
  color: hsl(235, 36%, 46%);
  margin-left: 0;
}

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

.form-wrap {
  min-height: 40vh; /* määrittelee korkeus, да покрива целия екран */
  background: hsl(235, 36%, 46%);
  display: flex;
  flex-direction: column;
  justify-content: center; /* центрира вертикално */
  align-items: center; /* центрира хоризонтално */
  padding: 20px;
  box-sizing: border-box;
  overflow: auto; /* sallii vierityksen, jos sisältö menee yli */
}
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; /*sulavat siirtymät*/
  /* display: none;  <-- Махаме този ред! */
}

#toTopBtn:hover {
  background-color: #38c0da;
  transform: scale(1.1); /*sulavat siirtymät*/
}
.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: 400px) {
  .nav {
    display: flex;
    gap: 2rem; /* etäisyys  Projects, About, Contact  välillä*/
    justify-content: flex-end;
  }
  @media (max-width: 600px) {
    .hero {
      height: auto;
      min-height: 70vh;
      padding: 40px 20px;
    }
  }
}
