* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


body {
  min-height: 100vh;
  font-size: 24px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

ul {
  list-style: none;
}

header {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;

  nav {
    display: flex;
    flex-direction: none;
    height: 110px;
    background-color: beige;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    ul {
      display: flex;
  

      li a {
        color: rgb(0, 0, 0);
        padding: 10px 15px;
        display: inline-block;
        
        &:hover {
          transition: 500ms ease-in-out;
          color: aquamarine;
        }
      }
    }
  }
}

a{
  text-decoration: underline;
  color: inherit;
  display: block;
}

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

header img {
  height: 100px;
}

.banner {
  background-color: silver;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  gap: 40px;
}

p {
  max-width: 50%;
}

.cta {
  background-color: rgb(0, 0, 0);
  color: white;
  padding: 15px 50px;
  border-radius: 10px;


  &:hover {
    background-color: rgb(5, 124, 129);
    transition: all 0.9s ease-in-out;
  }
}

.first {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  color: black;
  padding: 40px;

  p {
    max-width: 50%;
    text-align: center;
  }

  .tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .item {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    height: 600px;
    border-radius: 5px;

  p {
    color: #333;
    text-align: center;
  }

  &.image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    


  &:nth-child(1) {
    background-color: rgb(39, 61, 54);
  }

  &:nth-child(3) {
    background-color: #75a17d;
  }

  &:nth-child(5) {
    background-color: #dcdadb;
    }
   }

   &.info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 40px;

    &:nth-child(2) {
      border-bottom: rgb(39, 61, 54) 5px solid;

      a {
        color: rgb(39, 61, 54);
        font-weight: bold;
        padding: 15px 50px;
        border: 2px solid rgb(39, 61, 54);
        border-radius: 40px;
        transition: all 0.5s ease-in-out;

        &:hover {
          background-color: rgb(99, 152, 135);
          transition: 0.5s ease-in-out;
        }
      }
    }

    &:nth-child(4) {
      border-bottom: #75a17d 5px solid;

      a {
        color: rgb(39, 61, 54);
        font-weight: bold;
        padding: 15px 50px;
        border: 2px solid rgb(39, 61, 54);
        border-radius: 40px;
        transition: all 0.5s ease-in-out;

        &:hover {
          background-color: rgb(99, 152, 135);
          transition: 0.5s ease-in-out;
        }
      }
    }
    
    &:nth-child(6) {
      border-bottom: #dcdadb 5px solid;

      a {
        color: rgb(39, 61, 54);
        font-weight: bold;
        padding: 15px 50px;
        border: 2px solid black;
        border-radius: 40px;
        transition: all 0.5s ease-in-out;

        &:hover {
          background-color: #dcdadb;
        }
      }
    }
   }
 }
}

.feedback {
  background-color: #a2a2a2;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;

  .feedback-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 40px;

    .feedback-item {

      border-radius: 20px;
      padding: 40px;

      .user {
        display: flex;
        align-items: center;
        gap: 20px;

        img {
          height: 70px;
          width: 70px;
          border-radius: 50%;
        }
      }

      h4 {
        font-size: 28px;
        padding: 20px 0;
      }

      p {
        color: black;
      }

      &:nth-child(1) {
        grid-column: span 2;
        background-color: magenta;
      }
      &:nth-child(2) {
        background-color: olivedrab;
      }
      &:nth-child(3) {
        grid-row: span 2;
        background-color: aliceblue;
      }
      &:nth-child(4) {
        background-color: peru;
      }
      &:nth-child(5) {
        grid-column: span 2;
        background-color: lawngreen;
      }
    }
  }
}

footer {
  width: 100%;
  height: 70px;
  background-color: black;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  
}

/* Кнопка открытия чата */
#chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #007bff;
  border: none;
  color: white;
  font-size: 24px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}
#chat-toggle:hover {
  background: #0056b3;
}

/* Блок чата */
#chat-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  max-width: 90vw;
  height: 420px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px 15px 0 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

/* Активный класс для показа */
#chat-container.active {
  transform: translateY(0);
  opacity: 1;
}

/* Заголовок */
#chat-header {
  background: #007bff;
  color: white;
  padding: 12px 16px;
  font-weight: bold;
  border-radius: 15px 15px 0 0;
  user-select: none;
}

/* Область сообщений */
#chat-messages {
  flex-grow: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

/* Форма ввода */
#chat-input-form {
  display: flex;
  border-top: 1px solid #ccc;
  padding: 8px;
  background: #f9f9f9;
  border-radius: 0 0 15px 15px;
}
#chat-input {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
}
#chat-send {
  background: #007bff;
  border: none;
  color: white;
  padding: 0 15px;
  margin-left: 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
}

/* Затенение заднего фона */
.blur-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
}
.blur-bg.active {
  opacity: 1;
  visibility: visible;
}

/* Сообщения */
.message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 75%;
}
.message.user {
  background: #007bff;
  color: white;
  align-self: flex-end;
}
.message.bot {
  background: #e5e5ea;
  color: #333;
  align-self: flex-start;
}


@media screen and (max-width:1000px) {
  main{
    .first{
      tiles{
        grid-template-columns: 1fr;
      }
    }

    .feedback{
      .feedback-list{
        grid-template-columns: 1fr 1fr;
      }
    }
  }
}
