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

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
  background: radial-gradient(circle at top, #fdfbfb, #ebedee);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  padding-bottom: 20px;
}

section {
  padding: 40px 0;
  background: #fff;
}

h2 {
  text-align: center;
  font-size: 34px;
  margin-bottom: 50px;
}

/* ===== HEADER ===== */
header {
  position: relative;
  background: linear-gradient(120deg, #667eea, #764ba2);
  color: #fff;
  padding: 120px 0 100px;
  overflow: hidden;
}

header::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: 0;
  width: 100%;
  height: 160px;
  background: #fff;
  transform: skewY(-4deg);
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #ff4d4d, #ff7a18);
  color: #fff;
  text-decoration: none;
  border-radius: 40px;
  font-weight: bold;
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
}

/* ===== GRIDS ===== */
.services-grid,
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

/* ===== SERVICES ===== */
.service-card {
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .1);
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, .15);
}

.service-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.service-card p {
  font-size: 16px;
  color: #555;
}

/* ===== PORTFOLIO ===== */
.portfolio-item {
  border-radius: 18px;
  overflow: hidden;
  transition: transform .4s ease, box-shadow .4s ease;
}

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

.portfolio-item:hover {
  transform: scale(1.04);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
}

/* ===== FORM ===== */
.contact-form {
  display: grid;
  gap: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 16px;
  width: 100%;
}

.contact-form button {
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #ff4d4d, #ff7a18);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

/* ===== BALLS BACKGROUND ===== */
#balls-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.ball {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.4s ease;
  opacity: 0.85;
}

/* Все изображения чёрно-белые по умолчанию */
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  /* делаем черно-белым */
  transition: transform .4s ease, box-shadow .4s ease, filter .4s ease;
  /* добавляем плавное изменение фильтра */
}

/* При наведении – возвращаем цвет */
.portfolio-item:hover img {
  filter: grayscale(0%);
  /* цветное изображение */
}


.video-card {
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.video-card:hover video {
  transform: scale(1.03);
  /* лёгкое увеличение при наведении */
}

.contact-direct {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  font-size: 18px;
}

.contact-direct p {
  margin-bottom: 16px;
}

.contact-direct a {
  color: #ff4d4d;
  font-weight: bold;
  text-decoration: none;
}

.contact-direct a:hover {
  text-decoration: underline;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(120deg, #667eea, #764ba2);
  color: #fff;
  padding: 40px 20px;
}

.footer p {
  font-size: 16px;
  opacity: 0.85;
  margin: 4px 0;
  color: #fff;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
}

.footer-left {
  text-align: left;
  font-size: 14px;
}

.footer-center {
  margin-left: auto;
  text-align: right;
}

.footer-center h4 {
  margin-bottom: 8px;
}