/* ==========================================================================
   BANNER (HERO SECTION)
   ========================================================================== */

.banner {
  position: relative;
  width: 100%;
  height: 700px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-dark);
}

/* Parallax Layer */
.banner__parallax {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;  
  z-index: 1;
  will-change: transform;
  background: url(./../images/banner.jpg) center center no-repeat;
  background-size: cover;
}

/* Ping Pong Balls */
.banner__balls {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.pingpong-ball {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, #f0f0f0 50%, #dcdcdc 100%);
  box-shadow: 
    inset -3px -3px 8px rgba(0, 0, 0, 0.1),
    inset 2px 2px 6px rgba(255, 255, 255, 0.8),
    0 4px 12px rgba(0, 0, 0, 0.15);
  will-change: transform;
}

.pingpong-ball__seam {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 70%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
}

/* Размеры и позиции */
.pingpong-ball--1 {
  width: 70px;
  height: 70px;
  top: 15%;
  left: 10%;
  animation: floatBall1 8s ease-in-out infinite;
}

.pingpong-ball--2 {
  width: 40px;
  height: 40px;
  top: 60%;
  left: 5%;
  animation: floatBall2 6s ease-in-out infinite;
}

.pingpong-ball--3 {
  width: 55px;
  height: 55px;
  top: 25%;
  right: 10%;
  animation: floatBall3 10s ease-in-out infinite;
}

.pingpong-ball--4 {
  width: 30px;
  height: 30px;
  bottom: 20%;
  right: 15%;
  animation: floatBall4 7s ease-in-out infinite;
}

/* Анимации */
@keyframes floatBall1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(30px, -40px) rotate(90deg); }
  50% { transform: translate(-20px, -80px) rotate(180deg); }
  75% { transform: translate(40px, -30px) rotate(270deg); }
}

@keyframes floatBall2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -60px) scale(1.1); }
  66% { transform: translate(-30px, -100px) scale(0.9); }
}

@keyframes floatBall3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-60px, -50px) rotate(180deg); }
}

@keyframes floatBall4 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-20px, -30px); }
  50% { transform: translate(30px, -60px); }
}

/* Banner Content */
.banner__content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: var(--color-white);
  padding: 0 var(--container-padding);
  max-width: 900px;
}

.banner__title {
  font-size: var(--text-7xl);
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.banner__title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner__subtitle {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.banner__buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

/* Scroll Down */
.banner__scroll {
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%) !important;
  z-index: 10;
}

.scroll-down {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--transition-base);
}

.scroll-down:hover {
  color: var(--color-white);
}

.scroll-down__arrow {
  font-size: var(--text-lg);
  animation: scrollArrow 1.5s ease-in-out infinite;
}

@keyframes scrollArrow {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
}

/* ==========================================================================
   TENNIS TABLE WITH NET (GRID ANIMATION)
   ========================================================================== */

.tennis-table {
  display: none;
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) !important;
  width: 80%;
  max-width: 900px;
  height: 180px;
  z-index: 4;
  pointer-events: none;
}

/* Поверхность стола */
.tennis-table__surface {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12px;
  background: linear-gradient(to bottom, #1a5c2a 0%, #0d3d18 50%, #092e12 100%);
  border-radius: 2px;
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05);  
  background-image:
    linear-gradient(to right, transparent 49.5%, rgba(255,255,255,0.3) 49.5%, rgba(255,255,255,0.3) 50.5%, transparent 50.5%),
    linear-gradient(to bottom, #1a5c2a 0%, #0d3d18 50%, #092e12 100%);
}

/* Сетка */
.tennis-table__net {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 0;
  z-index: 2;
}

.tennis-table__net-pole {
  width: 6px;
  height: 50px;
  background: linear-gradient(to right, #888 0%, #ccc 50%, #888 100%);
  border-radius: 2px;
  flex-shrink: 0;
}

.tennis-table__net-mesh {
  width: 200px;
  height: 40px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px,
      transparent 4px,
      rgba(255, 255, 255, 0.4) 4px,
      rgba(255, 255, 255, 0.4) 5px
    ),
    repeating-linear-gradient(
      to right,
      transparent 0px,
      transparent 8px,
      rgba(255, 255, 255, 0.15) 8px,
      rgba(255, 255, 255, 0.15) 9px
    );
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  position: relative;
}

.tennis-table__net-mesh::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
}

/* Мяч */
.tennis-table__ball {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  z-index: 3;
  will-change: left, bottom, transform;

  /* Реалистичный оранжевый мяч */
  background: radial-gradient(
    circle at 35% 30%,
    #fff8e8 0%,
    #ffb84d 20%,
    #ff7600 50%,
    #e06000 75%,
    #cc5500 100%
  );
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset -2px -2px 6px rgba(0, 0, 0, 0.15),
    inset 2px 2px 4px rgba(255, 255, 255, 0.3);
}

/* Блик на мяче */
.tennis-table__ball::before {
  content: '';
  position: absolute;
  top: 12%;
  left: 18%;
  width: 30%;
  height: 20%;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: rotate(-25deg);
}

/* Шов мяча */
.tennis-table__ball::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  width: 80%;
  height: 2px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translateY(-50%) rotate(-20deg);
}

/* Тень мяча на столе */
.tennis-table__ball-shadow {
  position: absolute;
  width: 24px;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  filter: blur(3px);
  z-index: 2;
  will-change: left, opacity, transform;
}

/* Ракетки */
.tennis-table__racket {
  position: absolute;
  bottom: 15px;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.15);
  z-index: 1;
}

.tennis-table__racket--left {
  left: -10px;
  transform: rotate(-30deg);
}

.tennis-table__racket--right {
  right: -10px;
  transform: rotate(30deg) scaleX(-1);
}

/* ==========================================================================
   BALL ANIMATION (JS will control this)
   ========================================================================== */

/* Начальное положение мяча */
.tennis-table__ball {
  left: 5%;
  bottom: 20px;
}

.tennis-table__ball-shadow {
  left: calc(5% + 2px);
  bottom: 8px;
}

/* ==========================================================================
   TABLE RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  .tennis-table {
    width: 95%;
    height: 140px;
    bottom: 60px;
  }

  .tennis-table__net-mesh {
    width: 120px;
    height: 30px;
  }

  .tennis-table__net-pole {
    height: 38px;
    width: 4px;
  }

  .tennis-table__ball {
    width: 22px;
    height: 22px;
  }

  .tennis-table__ball-shadow {
    width: 18px;
    height: 6px;
  }

  .tennis-table__racket {
    font-size: 1.8rem;
  }
  .banner__scroll {
    bottom: -60px;
  }
}

@media (max-width: 576px) {
  .tennis-table {
    height: 100px;
    bottom: 40px;
  }

  .tennis-table__net-mesh {
    width: 80px;
    height: 22px;
  }

  .tennis-table__net-pole {
    height: 28px;
  }

  .tennis-table__ball {
    width: 18px;
    height: 18px;
  }

  .tennis-table__surface {
    height: 8px;
  }

  .tennis-table__racket {
    display: none;
  }
}

@media (max-width: 768px) {
  .tennis-table {
    display: none;
  }
}