/*
	* {
		box-sizing: border-box;
	}
		*/

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
}

header {
  position: sticky;
  top: 0;
}

footer {
  position: sticky;
  bottom: 0;
}

header,
footer {
  text-align: center;
  background-color: #333;
  color: white;
  padding: 20px;
  z-index: 10;
}

header h1 {
  font-size: 32px;
}

.flex-section {
  padding: 20px;
  padding-top: 40px;
  background-color: #f4f4f4;
  transition: all 0.3s ease-in-out;
}

.flex-section:hover {
  background-color: #e0e0e0;
}

main h2 {
  font-size: 22px;
  font-weight: 700;
  padding-bottom: 20px;
  text-align: center;
}

.flex-section {
  text-align: center;
}

.flex-container {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  margin-top: 30px;
  flex-wrap: wrap;
  gap: 10px;
}

.flex-item {
  width: 30%;
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

.flex-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.flex-item img {
  width: 100%;
  border: 1px solid #ddd;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  /* margin-bottom: 8px; */
}

/* Стили для grid-секции */

.grid-section {
  background-color: #eaeaea;
  padding: 20px;
  padding-top: 40px;
  text-align: center;
  animation: fadeIn 1s ease-in-out;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  justify-items: center;
  margin-top: 30px;
}

.grid-item {
  background-color: #fff;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.3s;
}

.grid-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.grid-item img {
  width: 100%;
  border: 1px solid #ddd;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* ПРимер работы с позиционированием */

.to-top {
  position: fixed;
  right: 2%;
  bottom: 2%;
  height: 50px;
  width: 50px;
  border: none;
  border-radius: 5px;
  background-color: black;
  color: white;
  z-index: 20;
  transition: all 0.3s;
}

.to-top:hover {
  transform: scale(1.1);
}

/* Анимация с использованием @keaframes */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
